package com.cman777.springc.ratelimiter.collector;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author chenzhicong
 * @time 2020/9/17 17:52
 */
public class ServletCollectorRegistry {
    private Map<String, ServletCollector> servletCollectorMap = new ConcurrentHashMap<>();
    public  ServletCollector getServletCollector(String servletCollectorName){
        return servletCollectorMap.get(servletCollectorName);
    }

    public void registerServletCollector(String collectorName,ServletCollector servletCollector){
        servletCollectorMap.put(collectorName,servletCollector);
    }

}
